home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Grafik / Misc / ImageEnginer / ARexx / PageStream_Export_E.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1997-01-29  |  1.7 KB  |  72 lines

  1. /*
  2. ** $VER: PageStream_Export 1.1
  3. **
  4. ** Copyright © 1996 by Volkmar Funke
  5. **
  6. ** This Arexx Script exports a picture to Pagestream3.
  7. ** Both programs must already be running.
  8. ** Script has been tested with PageStream3.2 and ImageEngineer 3.4.
  9. **
  10. ** [english translation by Andreas R. Kleinert]
  11. */
  12.  
  13. OPTIONS RESULTS
  14. TEMP_FILE = 't:Image_from_IE'
  15. TRACE OFF
  16.  
  17. /* Make sure, that the ARexx script is supported */
  18.  
  19. if ~show('L','rexxsupport.library') then
  20.         call addlib('rexxsupport.library',0,-30)
  21. if ~show('L','softlogik:libs/slarexxsupport.library') then
  22.         call addlib('softlogik:libs/slarexxsupport.library', 0, -30)
  23.  
  24. if ~show(P,'PAGESTREAM') then do
  25.         'REQUEST' '"PageStream not running !!"' '" OK "'
  26.         EXIT
  27. end
  28.  
  29. 'SAVE_DATA' arg(1) '"'||TEMP_FILE||'"' '"ILBM CmpByteRun1"' /*Save image*/
  30.  if (RC ~= 0) then do
  31.         'REQUEST' '"Could not create temporary file"' '" OK "'
  32.         EXIT
  33.  end
  34.  
  35. /* Requester has been added, so that the image won't be lost when
  36. ** turning the computer off !!
  37. */
  38.  
  39.   'REQUEST "             !!! ATTENTION !!!' D2C(10),
  40.                       '  ' D2C(10),
  41.            'Picture has only been saved temporarily !" " OK "'
  42.  
  43. ADDRESS 'PAGESTREAM'
  44.  
  45. /* Passing the graphics, error if no document opened */
  46.  
  47. 'refresh wait'     /* PageStream freezes screen refresh -> ctrl f10 */
  48.  
  49. ScreentoFront
  50.  
  51. placegraphic FILE '"'||TEMP_FILE||'"'
  52.  if rc~=0 then do
  53.  
  54.     ADDRESS 'IMAGEENGINEER'
  55.     IE_TO_FRONT
  56.     REQUEST '"No document opened in PageStream !"' ' "OK" '
  57.     signal cancel
  58.  end
  59.  
  60. 'refresh continue'
  61.  
  62. EXIT
  63.  
  64. CANCEL:
  65.  
  66. ADDRESS COMMAND
  67. 'run >nil: delete' '"'||TEMP_FILE||'"'
  68.  
  69. ADDRESS 'PAGESTREAM' /* Must be done, since otherwise it would not */
  70. 'refresh continue'   /* be displayed when a new document is opened */
  71.   EXIT
  72.